<template>
  <div class="common-layout">
    <el-container>   
      <el-aside width="200px">
          <ul v-infinite-scroll="load" class="infinite-list" style="overflow: auto;height: 585px;">
          <el-menu
          default-active="2"
          class="el-menu-vertical-demo"
          >
    <el-menu-item-group title="客户管理">
     <el-menu-item index="1-1"@click="TZ1('Customer')" >客户列表</el-menu-item>
   </el-menu-item-group>
    <el-menu-item-group title="会员卡">
     <el-menu-item index="2-1">会员卡管理</el-menu-item>
     <el-menu-item index="2-2">会员权益</el-menu-item>
   </el-menu-item-group>
    <el-menu-item-group title="资产管理">
     <el-menu-item index="3-1">储值设置</el-menu-item>
     <el-menu-item index="3-1">积分设置</el-menu-item>
   </el-menu-item-group>
</el-menu>
  </ul>
      </el-aside>

      <el-main>
          <RouterView />
      </el-main>
    </el-container>
  </div>
</template>
<script lang="ts" setup>
import { useRouter } from 'vue-router';
import { ref } from 'vue'
const router=useRouter();
const count = ref(0)
const load = () => {
  count.value += 2
}

const TZ1=(name:any)=>{
  router.push({
      name:name
  })
}


</script>

<style>
.infinite-list {
  height: 300px;
  padding: 0;
  margin: 0;
  list-style: none;
}
.infinite-list .infinite-list-item {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 50px;
  background: var(--el-color-primary-light-9);
  margin: 10px;
  color: var(--el-color-primary);
}
.infinite-list .infinite-list-item + .list-item {
  margin-top: 10px;
}
</style>